package cn.edu.nju.software.action.category;

import cn.edu.nju.software.service.intf.CategoryService;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class DeleteCategoryAction extends ActionSupport {
	
	private int id;
	private CategoryService categoryService;

	public void setId(int id) {
		this.id = id;
	}

	public void setCategoryService(CategoryService categoryService) {
		this.categoryService = categoryService;
	}
	
	@Override
	public String execute() throws Exception {
		categoryService.deleteCategory(id);
		return SUCCESS;
	}

}
